Skip to content

test: migrate math/base/special/cbrtf to ULP-based testing#11859

Open
MANDEep22332 wants to merge 2 commits intostdlib-js:developfrom
MANDEep22332:test-cbrtf
Open

test: migrate math/base/special/cbrtf to ULP-based testing#11859
MANDEep22332 wants to merge 2 commits intostdlib-js:developfrom
MANDEep22332:test-cbrtf

Conversation

@MANDEep22332
Copy link
Copy Markdown
Contributor

Progresses #11352

Description

What is the purpose of this pull request?

This pull request:

  • removed the abs an eps for the test.js
  • implemenet new test return statement

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

{{TODO: add disclosure if applicable}}


@stdlib-js/reviewers

@MANDEep22332 MANDEep22332 requested a review from a team April 30, 2026 10:31
@stdlib-bot stdlib-bot added Math Issue or pull request specific to math functionality. Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Apr 30, 2026
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/base/special/cbrtf $\color{green}180/180$
$\color{green}+100.00%$
$\color{green}5/5$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}180/180$
$\color{green}+100.00%$

The above coverage report was generated for the changes in this PR.

@kgryte kgryte changed the title test: migrate math/base/special/cbrtf to ULP-based testing test: migrate math/base/special/cbrtf to ULP-based testing May 1, 2026
@kgryte kgryte added difficulty: 1 Low degree of difficulty. Should be straightforward to implement and/or resolve. Tests Pull requests specifically adding tests. review: 5 and removed Needs Review A pull request which needs code review. labels May 1, 2026
tol = EPS * abs( expected[ i ] );
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. Δ: '+delta+'. tol: '+tol );
}
t.strictEqual( isAlmostSameValuef( y, expected[ i ], 3 ), true, 'returns expected value' );
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MANDEep22332 You're using a maxULPs argument of 3 here and below, but previously tests passed with just EPS and the JS implementation uses 1. Is there a reason for the discrepancy?

@kgryte kgryte added the Needs Discussion Needs further discussion. label May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

difficulty: 1 Low degree of difficulty. Should be straightforward to implement and/or resolve. Good First PR A pull request resolving a Good First Issue. Math Issue or pull request specific to math functionality. Needs Discussion Needs further discussion. review: 5 Tests Pull requests specifically adding tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants